package com.xyz.pringcloud.service;

import com.xyz.springcloud.entity.CommonResult;
import com.xyz.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
/**
 *value 设置要调用的哪个注册中心的服务
 * 注意不需要http
 */
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
/**
 * @author 肖咉卓
 */
public interface PaymentFeignService {
    @GetMapping("/payment/get/{id}")
    public CommonResult find(@PathVariable("id") Long id);

    @GetMapping(value = "/payment/feign/timeout")
    public String paymentFeignTime();

}
